Skip to content

[jextract] CodePrinter indentation improvements #221

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 16, 2025

Conversation

rintaro
Copy link
Member

@rintaro rintaro commented Apr 15, 2025

Improve indentations.

Introduce atNewline property in the printer, to indicate if the next print() should print the indentation on the first line. Stop handling single line print() specially.

before:
Screenshot 2025-04-15 at 11 26 54 PM

after:
Screenshot 2025-04-15 at 11 26 20 PM

Improve indentations. Introduce 'atNewline' property in the printer, to
indicate if the next 'print()' should print the indentation on the first
line. Stop handling single line 'print()' specially.
@rintaro rintaro merged commit e18a26b into swiftlang:main Apr 16, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants